﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DB;

/// <summary>
///CourseSearch 的摘要说明
/// </summary>
public class CourseSearch
{
    DataAccess da = new DataAccess();
    public CourseSearch()
    {
        //
        //TODO: 在此处添加构造函数逻辑
        //
    }


    public string getCoursesByStdTerm(string stdid, string yterm)
    {
        string[] termChange = TermUtils.splitYTerm(yterm);
        string year = termChange[0];
        string term = termChange[1];
        string sql_str = "exec course_getCoursesByStdTerm " + stdid + "," + year + "," + term;
        return JsonConvertor.getJsonTable(sql_str);
    }
    public string getCoursesByTechTerm(string techid, string yterm)
    {
        string[] termChange = TermUtils.splitYTerm(yterm);
        string year = termChange[0];
        string term = termChange[1];
        string sql_str = "exec course_getCoursesByTechTerm " + techid + "," + year + "," + term;
        return JsonConvertor.getJsonTable(sql_str);
    }
}